<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta content="en" name="language">
	<title>confirm_access</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link media="screen" href="../docutils-api.css" type="text/css" rel="stylesheet">

</head>

<body>

<div class="banner">
<img src="../images/gm-107x76.png" alt="GraphicMagick logo" width="107" height="76" />
<span class="title">GraphicsMagick</span>
<form action="http://www.google.com/search">
  <input type="hidden" name="domains" value="www.graphicsmagick.org" />
  <input type="hidden" name="sitesearch" value="www.graphicsmagick.org" />
<span class="nowrap"><input type="text" name="q" size="25" maxlength="255" />&nbsp;<input type="submit" name="sa" value="Search" /></span>
</form>
</div>


<div class="navmenu">
<ul>
  <li><a href="../index.html">Home</a></li>
  <li><a href="../project.html">Project</a></li>
  <li><a href="../download.html">Download</a></li>
  <li><a href="../README.html">Install</a></li>
  <li><a href="../Hg.html">Source</a></li>
  <li><a href="../NEWS.html">News</a> </li>
  <li><a href="../utilities.html">Utilities</a></li>
  <li><a href="../programming.html">Programming</a></li>
  <li><a href="../reference.html">Reference</a></li>
</ul>
</div>

<main id="confirm-access">
<h1 class="title">confirm_access</h1>
<p class="subtitle" id="access-confirmation-functions">Access confirmation functions</p>
<div class="contents topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#magickconfirmaccess" id="id3">MagickConfirmAccess</a></p></li>
<li><p><a class="reference internal" href="#magicksetconfirmaccesshandler" id="id4">MagickSetConfirmAccessHandler</a></p></li>
</ul>
</div>
<section id="magickconfirmaccess">
<h1><a class="toc-backref" href="#id3">MagickConfirmAccess</a></h1>
<section id="synopsis">
<h2>Synopsis</h2>
<pre class="literal-block">MagickPassFail MagickConfirmAccess( const ConfirmAccessMode mode, const char *path,
                                    <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );</pre>
</section>
<section id="description">
<h2>Description</h2>
<p>MagickConfirmAccess() calls the access confirmation handler method with
parameters which describe the requested access mode and path/URL, as well
as an ExceptionInfo structure to update with any error information.  A
user-provided callback (set by MagickSetConfirmAccessHandler()) is
invoked.  If the callback returns MagickFail, then this function also
returns MagickFail, which is intended to determine if the operation may
continue.  The callback is expected to report the reason access is denied
by filling out the ExceptionInfo structure.  If the callback fails to do
so, then a generic &quot;access denied&quot; error is reported.</p>
<p>The format of the MagickConfirmAccess method is:</p>
<pre class="literal-block">MagickPassFail MagickConfirmAccess( const ConfirmAccessMode mode, const char *path,
                                    <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );</pre>
<dl class="simple">
<dt>mode:</dt>
<dd><p>The type of access to be performed.</p>
</dd>
<dt>path:</dt>
<dd><p>The local path or URL requested to be accessed.</p>
</dd>
<dt>exception:</dt>
<dd><p>Return any errors or warnings in this structure.</p>
</dd>
</dl>
</section>
</section>
<section id="magicksetconfirmaccesshandler">
<h1><a class="toc-backref" href="#id4">MagickSetConfirmAccessHandler</a></h1>
<section id="id1">
<h2>Synopsis</h2>
<pre class="literal-block">ConfirmAccessHandler MagickSetConfirmAccessHandler( ConfirmAccessHandler handler );</pre>
</section>
<section id="id2">
<h2>Description</h2>
<p>MagickSetConfirmAccessHandler() sets the access confirmation handler to
the specified method and returns the previous access confirmation handler.
This access confirmation handler is used to &quot;approve&quot; access to files and
URLs.  If the handler returns MagickFalse, then access is denied.  This
mechanism may be used to enforce security policies and/or may be used to
monitor file and URL accesses.</p>
<p>The format of the MagickSetConfirmAccessHandler method is:</p>
<pre class="literal-block">ConfirmAccessHandler MagickSetConfirmAccessHandler( ConfirmAccessHandler handler );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>handler:</dt>
<dd><p>Specifies a pointer to a method to handle access confirmation.</p>
</dd>
</dl>
</section>
</section>
</main>


<hr class="docutils">
<div class="document">
    <p><a href="../Copyright.html">Copyright</a> © GraphicsMagick Group 2002-2025<!--SPONSOR_LOGO--></p>
</div>

</main>
</body>
</html>
